define(['app'], function(app) {
    'use strict';

    //实例化方法
    var factory = function (Http) {
		function get_data_goodsEdit(result){
			if(HTTP_ISLOGIC){
				
			}else{
				return result;
			}
}
        //返回信息
        return {
          	//发布修改求购信息
			goods_edit: function(title,id,end_time,address_id,invoice_type,phone,memo,name,describe,type_id,brand_need,brand_id,count,photo_id,image,callback) {
				//post请求
				Http.post({
					method:'info.findgoods.edit',
					updataParams:{
					title:title,
					id:id,
					end_time:end_time,
					address_id:address_id,
					invoice_type:invoice_type,
					phone:phone,
					memo:memo,
					goods:[{
					name:name,
					describe:describe,
					cat_type_id:type_id,
					brand_need:brand_need,
					brand_id:brand_id
					}],
					count:count,
					photo:[{
					id:photo_id,
					image:image}]
					}
				}, function(result) {
					//函数回调
					//函数回调
					if(callback)
						callback(result);
				},function(e){
					
				},function(){
					
				});

            },
        };
    }

    factory.$inject = ['Http'];
    return app.registerService("Mypbuy", factory);
});